<?php
/**
 * #Celebrate Shieh
 *             ,%%%%%%%%,
 *           ,%%/\%%%%/\%%
 *          ,%%%\c "" J/%%%
 * %.       %%%%/ o  o \%%%
 * `%%.     %%%%    _  |%%%
 *  `%%     `%%%%(__Y__)%%'
 *  //       ;%%%%`\-/%%%'
 * ((       /  `%%%%%%%'
 *  \\    .'          |
 *   \\  /       \  | |
 *    \\/         ) | |
 *     \         /_ | |__
 *     (___________))))))) 攻城湿
 *
 *        _       _
 * __   _(_)_   _(_) __ _ _ __
 * \ \ / / \ \ / / |/ _` |'_ \
 *  \ V /| |\ V /| | (_| | | | |
 *   \_/ |_| \_/ |_|\__,_|_| |_|
 */

use Illuminate\Support\Facades\Route;

Route::group([ 'prefix' => 'blog', 'namespace' => 'Blog', 'as' => 'blog.' ], function () {
    Route::group([ 'prefix' => 'sensitive' ], function () {
        Route::get('index', 'SensitiveController@index')->name('sensitive.index');//敏感词展示
        Route::post('store', 'SensitiveController@store')->name('sensitive.store');//敏感词修改
    });//博客敏感词管理
    Route::group([ 'prefix' => 'material' ], function () {
        Route::get('index', 'MaterialController@index')->name('material.index');//素材库展示
        Route::get('picFile', 'MaterialController@picFile')->name('material.picFile');//预览素材库
        Route::get('destroy', 'MaterialController@destroy')->name('material.destroy');//删除素材库文件
    });//博客素材库
    Route::resource('user', 'UserController');//用户 资源路由
    Route::group([ 'prefix' => 'user' ], function () {
        Route::post('status', 'UserController@status')->name('user.status');//用户修改状态
        Route::post('delete', 'UserController@delete')->name('user.delete');//用户删除
    });//博客用户管理
    Route::resource('category', 'CategoryController');//分类 资源路由
    Route::group([ 'prefix' => 'category' ], function () {
        Route::delete('status/{status}', 'CategoryController@status')->name('category.status');//分类修改状态
        Route::post('sort', 'CategoryController@sort_order')->name('category.sort');//分类排序
    });//博客分类
    Route::resource('list', 'ListController');//菜单 资源路由
    Route::group([ 'prefix' => 'list' ], function () {
        Route::delete('list/{list}', 'ListController@status')->name('list.status');//菜单修改状态
        Route::post('sort', 'ListController@sort_order')->name('list.sort');//分类排序
    });//博客菜单
    Route::resource('label', 'LabelController');//标签 资源路由
    Route::group([ 'prefix' => 'label' ], function () {
        Route::post('examine', 'LabelController@examine')->name('label.examine');//审核
        Route::delete('label/{label}', 'LabelController@status')->name('label.status');//标签修改状态
        Route::post('delete', 'LabelController@delete')->name('label.delete');//批量删除
    });//博客标签
    Route::resource('link', 'LinkController');//友情链接 资源路由
    Route::group([ 'prefix' => 'link' ], function () {
        Route::delete('link/{link}', 'LinkController@status')->name('link.status');//友情链接修改状态
        Route::post('delete', 'LinkController@delete')->name('link.delete');//批量删除
    });//友情链接
    Route::resource('notice', 'NoticeController');//公告 资源路由
    Route::group([ 'prefix' => 'notice' ], function () {
        Route::delete('notice/{notice}', 'NoticeController@status')->name('notice.status');//公告修改状态
        Route::post('delete', 'NoticeController@delete')->name('notice.delete');//批量删除
    });//公告
    Route::group([ 'prefix' => 'article' ], function () {
        Route::get('index', 'ArticleController@index')->name('article.index');//文章首页
        Route::get('create', 'ArticleController@create')->name('article.create');//文章添加
        Route::get('article/{article}', 'ArticleController@edit')->name('article.edit');//编辑页面
        Route::post('article', 'ArticleController@store')->name('article.store');//文章保存
        Route::put('article/{article}', 'ArticleController@update')->name('article.update');//保存
        Route::get('show/{show}', 'ArticleController@show')->name('article.show');//文章详情
        Route::delete('/{article}', 'ArticleController@destroy')->name('article.destroy');//文章删除
        Route::delete('article/{article}', 'ArticleController@status')->name('article.status');//文章修改状态
        Route::post('delete', 'ArticleController@delete')->name('article.delete');//批量删除
        Route::patch('examine', 'ArticleController@examine')->name('article.examine');//文章详审核
    });//文章
    Route::group([ 'prefix' => 'comment' ], function () {
        Route::get('index', 'CommentController@index')->name('comment.index');//评论首页
        Route::delete('/{comment}', 'CommentController@destroy')->name('comment.destroy');//评论删除
        Route::delete('comment/{comment}', 'CommentController@status')->name('comment.status');//评论修改状态
        Route::post('delete', 'CommentController@delete')->name('comment.delete');//批量删除
    });//评论
    Route::group([ 'prefix' => 'config' ], function () {
        Route::get('index', 'ConfigController@index')->name('config.index');//设置首页
        Route::post('store', 'ConfigController@store')->name('config.store');//设置保存
    });//博客前端设置
    Route::group([ 'prefix' => 'search' ], function () {
        Route::get('index', 'SearchController@index')->name('search.index');//搜索首页
        Route::delete('/{destroy}', 'SearchController@destroy')->name('search.destroy');//搜索删除
        Route::post('delete', 'SearchController@delete')->name('search.delete');//搜索批量删除
        Route::delete('search/{search}', 'SearchController@status')->name('search.status');//搜索修改状态
    });//博客搜索
    Route::group([ 'prefix' => 'feedback' ], function () {
        Route::get('index', 'FeedbackController@index')->name('feedback.index');//意见反馈首页
        Route::delete('/{destroy}', 'FeedbackController@destroy')->name('feedback.destroy');//意见反馈删除
        Route::post('delete', 'FeedbackController@delete')->name('feedback.delete');//意见反馈批量删除
        Route::patch('feedback', 'FeedbackController@status')->name('feedback.status');//意见反馈修改状态
    });//博客意见反馈
    Route::group([ 'prefix' => 'message' ], function () {
        Route::get('index', 'MessageController@index')->name('message.index');//留言首页
        Route::delete('/{destroy}', 'MessageController@destroy')->name('message.destroy');//留言删除
        Route::post('delete', 'MessageController@delete')->name('message.delete');//留言批量删除
        Route::patch('status', 'MessageController@status')->name('message.status');//留言修改状态
    });//博客消息
    Route::group([ 'prefix' => 'gallery' ], function () {
        Route::get('index', 'GalleryController@index')->name('gallery.index');//图片集锦首页
        Route::get('category', 'GalleryController@category')->name('gallery.category');//图片集锦分类
        Route::get('show/{show}', 'GalleryController@show')->name('gallery.show');//图片集锦详情
        Route::delete('/{destroy}', 'GalleryController@destroy')->name('gallery.destroy');//图片集锦删除
        Route::post('delete', 'GalleryController@delete')->name('gallery.delete');//图片集锦批量删除
        Route::delete('gallery/{gallery}', 'GalleryController@status')->name('gallery.status');//图片集锦修改状态
        Route::patch('examine', 'GalleryController@examine')->name('gallery.examine');//图片集锦审核
    });//博客图片集锦
    Route::group([ 'prefix' => 'invitation' ], function () {
        Route::get('index', 'InvitationController@index')->name('invitation.index');//邀请关系首页
        Route::get('show/{show}', 'InvitationController@show')->name('invitation.show');//邀请关系详情
        Route::post('tree', 'InvitationController@tree')->name('invitation.tree');//邀请关系树列表
    });//博客邀请关系
});
